<?php


namespace app\model\user;


use think\Model;

class UserEvaluateModel extends Model
{
    protected $name = 'user_evaluate';
    protected $autoWriteTimestamp = true;
    protected $json = ['img'];
    protected $jsonAssoc = true;

    public function user()
    {
        return $this->hasOne(UserModel::class, 'id', 'user_id')->withTrashed()->bind([
            'user_name' => 'username',
            'user_avatar' => 'avatar'
        ]);
    }
}